package jxls;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import net.sf.jxls.exception.ParsePropertyException;
import net.sf.jxls.transformer.XLSTransformer;

import org.apache.poi.openxml4j.exceptions.InvalidFormatException;

import processor.StyleRowProcessor;

public class Test5 {

	public static void main(String[] args) throws ParsePropertyException, InvalidFormatException, IOException {

		String rootPath = System.getProperty("user.dir");
		String template = rootPath + "/template/template5.xls";  
		String generate = rootPath + "/generate/generate5.xls";  
  
		Map<String, Object> beanParams = new HashMap<String, Object>();
		ArrayList<Integer> list = new ArrayList<Integer>();
		list.add(4);
		list.add(6);
		list.add(7);
		list.add(0);
        beanParams.put("list", list);
        
        XLSTransformer former = new XLSTransformer();
        former.registerRowProcessor(new StyleRowProcessor("tuyou"));
        former.transformXLS(template, beanParams, generate);
	}

}
